import React from 'react';
import { Icon } from 'antd';
import styles from './UsersTags.less';

const UsersTags = (props) => {
  const { className = '', label, onClick, disabled } = props;
  return (
    <div className={`${styles.u_tag} ${className} ${disabled ? styles.u_tag_disable : ''} dynamic-theme`}>
      <span className={styles.label}>{label}</span>
      <span
        className={[styles.close, 'dynamic-color'].join(' ')}
        onClick={(e) => {
          if (onClick) onClick(e);
        }}
      >
        <Icon type="close" />
      </span>
    </div>
  );
}
export default UsersTags;